gtk_application_inihit: allow no reason
authorMatthias Clasen <mclasen@redhat.com>
Fri, 14 Sep 2018 03:28:16 +0000 (23:28 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 14 Sep 2018 03:31:48 +0000 (23:31 -0400)
We document this argument as nullable, so treat it as such.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1327
gtk/gtkapplication-dbus.c

index a1f6eb0c3ab7557b10f9a4189478b67d4ae379f0..409f5f570f4acb02ca905f296a716e225a041846 100644 (file)
@@ -631,7 +631,7 @@ gtk_application_impl_dbus_inhibit (GtkApplicationImpl         *impl,
                                     g_variant_new ("(s@usu)",
                                                    dbus->application_id,
                                                    window ? gtk_application_impl_dbus_get_window_system_id (dbus, window) : g_variant_new_uint32 (0),
-                                                   reason,
+                                                   reason ? reason : "",
                                                    flags),
                                     G_DBUS_CALL_FLAGS_NONE,
                                     G_MAXINT,